/*
 * @Descripttion: ice
 * @version: 1.0.0
 * @Author: ice
 * @Date: 2025-01-17 11:48:49
 * @LastEditors: ice
 * @LastEditTime: 2025-02-13 11:49:37
 */
import request from '@/utils/request'

// 查询存储商品信息列表
export function listGoods(query) {
  return request({
    url: '/goods/goods/list',
    method: 'get',
    params: query
  })
} 

// 查询存储商品信息详细
export function getGoods(id) {
  return request({
    url: '/goods/goods/' + id,
    method: 'get'
  })
}

// 新增存储商品信息
export function addGoods(data) {
  return request({
    url: '/goods/goods',
    method: 'post',
    data: data
  })
} 
// 修改存储商品信息
export function updateGoods(data) {
  return request({
    url: '/goods/goods',
    method: 'put',
    data: data
  })
}

// 删除存储商品信息
export function delGoods(id) {
  return request({
    url: '/goods/goods/' + id,
    method: 'delete'
  })
}

// 新增的 decreaseStock 接口
export function decreaseStock(id) {
  return request({
    url: '/goods/goods/decreaseStock/' + id,
    method: 'put'
  })
}